a {
  text-decoration: none;
}

// --------------------------------------------------
// remove whitespace after footer
// --------------------------------------------------
footer {
  min-height: auto;
}

// --------------------------------------------------
// prevent overflow of long names in sidebar
// --------------------------------------------------
.td-sidebar-nav__section > ul {
  overflow-wrap: break-word;
}

.td-overlay--dark::after {
  background-color: rgba(33, 61, 122, 0.6);
}

#main_navbar {
  justify-content: end;
  padding-right: 16px;
}

.row > * {
  flex-shrink: 1;
}

.row > .container {
  max-width: 1200px;
}

// --------------------------------------------------
// custom navbar with larger logo, dropdown on mobile
// --------------------------------------------------
.td-navbar {
  min-height: auto;

  .navbar-brand {
    margin: 0;
    padding: 0;

    .text-uppercase {
      display: none;
    }

    .navbar-logo {
      margin-left: 1.5rem;
      
      svg {
        display: inline-block;
        position: relative;
        top: 0;
        z-index: 33;
        padding: 15px;
        height: 150px;
        background: white;
        border: 2px solid #4279f4;
        border-radius: 0 0 10px 10px;
        margin-top: -8px;

        @include media-breakpoint-down(md) {
          width: 120px;
          height: auto;
          padding: 10px;
          margin-left: 0;
        }
      }
    }
  }

  .navbar-nav {
    @include media-breakpoint-down(md) {
      font-size: .875rem;
      .dropdown {
        min-width: inherit;
      }
    }
  }
}

.td-sidebar {
  padding-bottom: 0.5rem;

  .td-sidebar__inner {
    padding-top: 30px;

    @include media-breakpoint-down(md) {
      padding-top: 10px;
    }
  }
}

.td-sidebar-toc {
  @supports (position: sticky) {
      position: sticky;
      top: 60px;
      height: calc(100vh - 120px);
      overflow-y: auto;
  }
}


// --------------------------------------------------
// 404 page
// --------------------------------------------------
.error-page {
  margin-top: 120px;

  ul {
    margin-bottom: 50px;
    list-style-type: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding-left: 0;
  }

  li {
    margin-left: 10px;
    margin-right: 10px;
  }

  h1 {
    text-align: center;
    margin-bottom: 20px;
  }

  @media (min-width: 768px) and (max-width: 991px) {
    margin-top: 100px;
  }

  @media (max-width: 767px) {
    margin-top: 50px;
  }
}

figcaption {
  font-size: 0.8rem;
  text-align: center;
  font-style: italic;
  color: #6c757d;
}

// --------------------------------------------------
// for tabbed code blocks
// --------------------------------------------------
.nav-tabs {
  border-bottom: none !important;
}

// --------------------------------------------------
// Prism.js code block styling
// --------------------------------------------------
// Override default code block background
pre[class*="language-"] {
  background: #f8f8f8 !important; // Lighter background color
}

// Ensure code blocks have proper positioning for toolbar
div.code-toolbar {
  position: relative;
  
  // Override any conflicting styles from Hugo's highlighter
  > pre[class*="language-"] {
    margin: 0;
    padding: 1em;
    overflow: auto;
    background: #f8f8f8; // Lighter background color
  }
}

// Ensure Prism toolbar appears in top-right corner
div.code-toolbar > .toolbar {
  position: absolute;
  top: .3em;
  right: .2em;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

// Make sure toolbar is visible on hover
div.code-toolbar:hover > .toolbar {
  opacity: 1;
}

// Style the copy button
div.code-toolbar > .toolbar > .toolbar-item > button {
  background: rgba(224, 224, 224, 0.2);
  color: #bbb;
  padding: 0 0.5em;
  border-radius: 0.5em;
  box-shadow: 0 2px 0 0 rgba(0,0,0,0.2);
  font-size: 0.8em;
  
  &:hover {
    background: rgba(224, 224, 224, 0.4);
    color: #333;
  }
}

.td-content > ul li,
.td-content > ol li.nav-item {
  margin-bottom: 0px;
}

.td-content .tab-content .highlight {
  margin: 0;
}

.tab-pane {
  border-radius: 0.25rem;
  padding: 0 16px 16px;

  border: 1px solid #dee2e6;

  &:first-of-type.active {
    border-top-left-radius: 0;
  }
}

nav.foldable-nav .ul-1 .with-child>label:hover:before {
  transform: none;
}

nav.foldable-nav .ul-1 .with-child>input:checked~label:hover:before {
  transform: rotate(90deg) !important;
}

div.feature-state-notice {
    background-color: #daeaf9;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1em;

    font-size: 1.2em;

    > .feature-state-name::before {
      content: 'ⓘ  ';
      color: #326ce5; // Kubernetes blue
    }
    > .feature-state-name {
      display: inline-block;
      font-size: 0.95em;
      font-weight: bold;
      color: #000;
    }

    code {
      color: #000;
      font-size: 1em;
      background-color: #daeaf9;
    }

    margin-right: 2em;
    max-width: 80%;

    &.feature-deprecated {
      > .feature-state-name::before {
        color: #ed6a5a;
      }

      background-color: #fbe1de;
    }
  }

// --------------------------------------------------
// API Reference Styling
// --------------------------------------------------

// Section headers
.td-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.5rem;
}

// "Appears in" section styling
.td-content strong {
  font-weight: 600;
}

.td-content ul li {
  margin-bottom: 0.25rem;
}

// Table styling
.td-content table.table {
  margin-bottom: 2.5rem;
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  
  th, td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    vertical-align: top;
    line-height: 1.5;
  }
  
  th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    font-size: 0.875rem;
  }
  
  tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.025);
  }
  
  tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
  }
  
  // Field column styling
  td:first-child {
    width: 30%;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    
    code {
      font-weight: 600;
      background-color: transparent;
      color: #d63384;
      font-size: 0.875em;
      padding: 0;
    }
    
    // Required badge styling
    B {
      color: #dc3545;
      font-size: 0.75em;
      margin-left: 0.25rem;
      font-weight: 700;
    }
  }
  
  // Description column styling  
  td:last-child {
    width: 70%;
    
    // Code blocks in descriptions
    code {
      background-color: #f8f9fa;
      color: #495057;
      padding: 0.125rem 0.25rem;
      border-radius: 0.25rem;
      font-size: 0.875em;
      border: 1px solid #e9ecef;
    }
    
    // Links in type references
    a code {
      color: #0056b3;
      text-decoration: none;
      background-color: #e3f2fd;
      border-color: #bbdefb;
      
      &:hover {
        text-decoration: underline;
        background-color: #bbdefb;
      }
    }
    
    // Muted text for missing descriptions
    .text-muted {
      color: #6c757d;
      font-style: italic;
      font-size: 0.875em;
    }
    
    // Embedded type descriptions
    p {
      margin-bottom: 0.5rem;
      line-height: 1.6;
      
      &:last-child {
        margin-bottom: 0;
      }
    }
    
    // Improve list formatting in descriptions
    ul, ol {
      margin-bottom: 0.5rem;
      padding-left: 1.25rem;
      
      li {
        margin-bottom: 0.25rem;
      }
    }
  }
}

// Resource Types list styling
.td-content ul {
  li {
    margin-bottom: 0.25rem;
    
    a {
      text-decoration: none;
      
      &:hover {
        text-decoration: underline;
      }
    }
  }
}

